package com.qcu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qcu.dto.DoctorInfoDTO;
import com.qcu.entity.DoctorInfo;
import com.qcu.mapper.DoctorInfoMapper;
import com.qcu.service.DoctorInfoService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author MyComputer
* @description 针对表【doctor_info】的数据库操作Service实现
* @createDate 2025-03-29 16:30:58
*/
@Service
public class DoctorInfoServiceImpl extends ServiceImpl<DoctorInfoMapper, DoctorInfo>
    implements DoctorInfoService{


    @Resource
    private DoctorInfoMapper doctorInfoMapper;

    @Override
    public List<DoctorInfoDTO> getDoctors(Integer departmentId) {
        if (departmentId == null){
            return doctorInfoMapper.getDoctorsAll();
        }
        return doctorInfoMapper.getDoctors(departmentId);
    }
}




